import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class Test04 {
    public static void main(String[] args) {
        HashMap<String,String> hm=new HashMap<>();
        hm.put("张三","南京");
        hm.put("李四","北京");
        Set<Map.Entry<String,String>> entries=hm.entrySet();
        Map.Entry[] arr1=entries.toArray(new Map.Entry[20]);
        Map map=Map.ofEntries(arr1);


    }
}
